home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_11 / pjp / ostream.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-02  |  399 b   |  23 lines

  1. ---------- Listing 2: The file ostream.c ----------------
  2.  
  3. // ostream -- ostream basic members
  4. #include <ostream>
  5.  
  6. ostream::~ostream()
  7.     {    // destruct an ostream -- DO NOTHING
  8.     }
  9.  
  10. _Bool ostream::opfx()
  11.     {    // setup for output
  12.     if (good() && tie() != 0)
  13.         tie()->flush();
  14.     return (good());
  15.     }
  16.  
  17. void ostream::osfx()
  18.     {    // wrapup after output
  19.     if (flags() & unitbuf)
  20.         flush();
  21.     }
  22.  
  23.